# Contributor: dai9ah <dai9ah@protonmail.com>
# Maintainer: dai9ah <dai9ah@protonmail.com>
pkgname=btfs
pkgver=2.22
pkgrel=0
pkgdesc="Bittorrent filesystem based on FUSE"
options="!check" # No testsuite
url="https://github.com/johang/btfs"
arch="all"
license="GPL-3.0-or-later"
depends="python3"
makedepends="autoconf automake curl-dev fuse-dev libtorrent-rasterbar-dev"
subpackages="$pkgname-doc"
source="btfs-$pkgver.tar.gz::https://github.com/johang/btfs/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vfi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="bc0fbded3e52cdc0093053762467e7290380a55e116ea2457b2700fe82110c4b6f7a592b9bebef335a14a4ce0fb262fc3dc9c0f4ea3b619d02595e4e74e36fa3  btfs-2.22.tar.gz"
